export const packageRadarOptions = function (radarOptions) {
  return {
    radar: {
      indicator: radarOptions.map((o) => {
        return {
          text: o.name
        }
      }),
      radius: 60,
      axisName: {
        color: 'rgb(192,192,192)',
        fontSize: 9
      },
      splitLine: {
        lineStyle: {
          color: [
            'rgba(62,175,124,0.1)',
            'rgba(62,175,124,0.2)',
            'rgba(62,175,124,0.4)',
            'rgba(62,175,124,0.6)',
            'rgba(62,175,124,0.8)',
            'rgb(62,175,124)'
          ].reverse()
        }
      },
      axisLine: {
        lineStyle: {
          color: '#3eaf7c80'
        }
      }
    },
    series: [
      {
        type: 'radar',
        symbolSize: 4,
        label: {
          show: true,
          fontSize: 8,
          color: '#4c4c4c'
        },
        areaStyle: {
          color: '#80dd9a60'
        },
        lineStyle: {
          color: '#3eaf7c90',
          width: 2
        },
        itemStyle: {
          color: '#3eaf7c'
        },
        data: [
          {
            value: radarOptions.map((o) => o.value),
            name: '个人成就'
          }
        ]
      }
    ]
  }
}
